package com.createdevelopment.gaoyou;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import android.annotation.SuppressLint;
import android.app.ListFragment;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import android.widget.SimpleAdapter;


@SuppressLint("NewApi")
public class SpecialFoodFragment extends ListFragment {
   
	private ListView listView;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View rootView = inflater.inflate(R.layout.fragment_specialfood, container, false);
		return rootView;
	}

	 public void onCreate(Bundle savedInstanceState) {

	        super.onCreate(savedInstanceState);

	 

		SimpleAdapter adapter = new SimpleAdapter(
				getActivity(),
				getData(),
				R.layout.about_list_item,
				new String[] { "title", "info", "img" },
				new int[] {R.id.about_item_title,R.id.about_item_info,R.id.about_item_img});
		
		setListAdapter(adapter);

	}

	 

	    private List<Map<String, Object>> getData() {

	        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();

	 

	      /*  Map<String, Object> map = new HashMap<String, Object>();

	        map.put("title", "G1");

	        map.put("info", "google 1");

	        map.put("img",);

	        list.add(map);

	 

	        map = new HashMap<String, Object>();

	        map.put("title", "G2");

	        map.put("info", "google 2");

	        map.put("img", R.drawable.tt_03);

	        list.add(map);

	 

	        map = new HashMap<String, Object>();

	        map.put("title", "G3");

	        map.put("info", "google 3");

	        map.put("img", R.drawable.tt_04);

	        list.add(map);
	        
	        map = new HashMap<String, Object>();

	        map.put("title", "G3");

	        map.put("info", "google 3");

	        map.put("img", R.drawable.tt_04);

	        list.add(map);

	        
	        map = new HashMap<String, Object>();

	        map.put("title", "G3");

	        map.put("info", "google 3");

	        map.put("img", R.drawable.tt_04);

	        list.add(map);
*/

	         

	        return list;

	    }   
	
	
}
